import java.util.Date;
import java.util.List;

import com.google.gdata.data.DateTime;

public class CalendarTest {
	
	public static void main(String[] args) throws Exception {
		GoogleCalendarService service = new GoogleCalendarService("madser12@gmail.com", "stucco12");

		/*
		SingleOccurrenceEvent event = new SingleOccurrenceEvent();
		event.setTitle("Do laundry");
		event.setDescription("Fold it carefully.  Don't want a mess.");
		event.setStart(new Date(DateTime
				.parseDateTime("2009-09-16T00:00:00").getValue()));
		event.setEnd(new Date(DateTime
				.parseDateTime("2009-09-16T02:00:00").getValue()));
		
		service.create(event);
		*/
		
		List<SingleOccurrenceEvent> events = service.retrieveEvents(new Date(DateTime
				.parseDateTime("2001-09-16T00:00:00").getValue()), new Date(DateTime
						.parseDateTime("2010-09-16T00:00:00").getValue()));
		
		for (SingleOccurrenceEvent myEvent : events) {
			System.out.println(myEvent.toString());
		}

	}

}
